{include admin.inc.header}

{include admin.inc.top}

<div class="container-fluid content-body">
    <div class="main">
        {include admin.inc.menu}

        <section class="right-section" id="right-section">
            <!-- start of inner-frame -->
            <div class="inner-iframe">

                {include admin.inc.bread}

                <!-- Nav tabs -->
                <ul class="nav nav-tabs">
                    {loop $__sysmenus[$menu_key][subs] $k $v}
                    <li{if $v[id]==$menu_id} class="active"{/if}><a href="{if $v[id]==$menu_id}javascript:;{else}/{$v[url]}{/if}"><i class="glyphicon glyphicon-th-list"></i> {$v[name]}</a></li>
                    {/loop}
                </ul>

                <div class="inner-container">
                    <!-- search form start -->
                    <form class="form-inline form-search" role="form" id="search-form">
                        <nav class="inline-form clearfix">
                            <div class="r">
                                <div class="form-group">
                                    <select name="select_mix_option1" id="select-mix-option1" class="form-control input-sm">
                                        <option value="product_no">货号</option>

                                    </select>
                                </div>
                                <!-- searchinput -->
                                <div class="form-group">
                                    <div class="input-group">

                                        <input type="text" class="form-control input-sm" maxlength="{maxlength}"
                                               placeholder="关键词" name="select_mix_option_value1"
                                               value="{$search_arr[select_mix_option_value1]}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="input-group">
                                        <div class="input-group-addon">
                                            销售时间
                                        </div>
                                        <input style="width:100px;" class="form-control form-control-inline input-sm mdate"
                                               size="16" type="text"
                                               name="start_time" value="{$search_arr[start_time]}"
                                               placeholder="开始时间"/>

                                        <div class="input-group-addon">
                                            -
                                        </div>
                                        <input style="width:100px;" class="form-control form-control-inline input-sm mdate"
                                               size="16" type="text"
                                               name="end_time" value="{$search_arr[end_time]}"
                                               placeholder="结束时间"/>
                                    </div>
                                </div>

                                <script>
                                    var select_mix_option1 = "{$search_arr[select_mix_option1]}";


                                    if (select_mix_option1) {
                                        $("select[name='select_mix_option1']").val(select_mix_option1);
                                    }


                                </script>
                                <button type="submit" class="btn btn-sm btn-success">搜索</button>
                                <button type="button" class="btn btn-sm btn-success js-7-search"><i class="glyphicon"></i>最近7天</button>
                                <button type="button" class="btn btn-sm btn-success js-30-search"><i class="glyphicon"></i>最近30天</button>

                                {data_export_btn}
                            </div>
                        </nav>

                    </form><!-- search form end -->

                    <form id="J_List_Form" autocomplete="off">

                        <div class="table-responsive" style="overflow-x: visible;">
                            <table class="table table-bordered table-hover" id="J_List_Table">
                                <!--tmpl-listtable-->

                                <!-- listblock -->
                                <thead>
                                <tr>
                                    <th width="20"><input type="checkbox" class="icheck check-all"/></th>
                                    <!--tmpl-fieldheaders-->
                                    {loop $tableHeader $val}
                                    <th>{$val}</th>
                                    {/loop}
                                </tr>
                                </thead>
                                <tbody>
                                {if empty($items)}
                                <tr>
                                    <td class="no-records text-center">{$noRecords}</td>

                                </tr>
                                {/if}
                                {loop $items $k $value}
                                <tr>
                                    <td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
                                    <!--tmpl-fieldlist-->
                                    <td>{$k+1}</td>

                                    <td>{$value[product_no]}</td>
                                    <td>{$value[type_name]}</td>
                                    <td>{$value[product_name]}</td>
                                    <td>{$value[factory_name]}</td>
                                    <td>{$value[brand_name]}</td>
                                    <td>{$value[pkg_size]}</td>
                                    <td>{$value[total_sale_quantity]}</td>
                                    <td>{$value[total_sale_amount]}</td>
                                    <td>{$value[total_sale_profit]}</td>

                                </tr>
                                {/loop}


                            </table>

                        </div>
                    </form>

                    <div class="text-right">
                        {$pagemenu}
                    </div>

                </div>

            </div><!-- end of inner -->
        </section>

    </div>
</div>

{include admin.inc.footer}

<script>
    seajs.use("sale", function(exports) {
        exports.init();
    });
</script>
</body>
</html>
